import request from './request'
// const baseURL = 'http://172.16.218.45:8082/server-api'
function getToken () {
  return request({
    url: `v2/token`,
    method: 'GET'
  })
}
function getSchoolCategory () {
  return request({
    url: `v2/stuEnrollInfoV2/getSchoolCategory`,
    method: 'GET'
  })
}
function getProducts (id, mobile) {
  return request({
    url: `v2/stuEnrollInfoV2/getProducts?schoolCategoryId=${id}&mobile=${mobile}`,
    method: 'GET'
  })
}
function getSchoolExercisesPaper (params = {}) {
  return request({
    url: `v2/stuEnrollInfoV2/getSchoolExercisesPaper`,
    method: 'GET',
    params
  })
}

function getExaminationPaperUrl (data) {
  return request({
    url: 'v2/stuEnrollInfoV2/getExaminationPaperUrl',
    method: 'POST',
    data
  })
}
function getAcademyMsg () {
  return request({
    url: `v2/stuEnrollInfoV2/getAcademyMsg`,
    method: 'GET'
  })
}
function dept () {
  return request({
    url: 'v2/stuEnrollInfoV2/dept',
    method: 'GET'
  })
}
function checkTelephone (phone) {
  return request({
    url: `v2/stuEnrollInfoV2/checkTelephone?telephone=${phone}`,
    method: 'get'
  })
}
function getOrderId () {
  return request({
    url: 'v2/stuEnrollInfoV2/genorderid',
    method: 'GET'
  })
}
function schoolCategoryAudit (schoolCategoryId) {
  return request({
    url: `v2/stuEnrollInfoV2/schoolCategoryAudit?schoolCategoryId=${schoolCategoryId}`,
    method: 'GET'
  })
}
function save (data) {
  return request({
    url: 'v2/stuEnrollInfoV2/save',
    method: 'POST',
    data
  })
}
export {
  getToken,
  getSchoolCategory,
  getProducts,
  getSchoolExercisesPaper,
  getExaminationPaperUrl,
  getAcademyMsg,
  dept,
  checkTelephone,
  getOrderId,
  schoolCategoryAudit,
  save
}
